import request, { Method, communityUrl, buyerUrl } from "@/plugins/request.js";
/**
 *
 */
// 获取资讯列表
export function follow(data) {
  // console.log(data);
  return request({
    url: communityUrl + "/mobileapi/community/follwo",
    method: Method.GET,
    headers: {
      "ADMINtoken": localStorage.getItem("accessToken"),
    },
    needToken: true,
    params: data
  });
}
// 获取平台全部
export function pactivity(data) {
  return request({
    url: communityUrl + '/mobileapi/community/pactivity',
    method: Method.GET,
    headers: {
      "ADMINtoken": localStorage.getItem("accessToken"),
    },
    needToken: true,
    params: data
  })
}


// 获取关注的活动详情
  export function actdetail(data) {
    return request({
      url: communityUrl + '/mobileapi/community/actdetail',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }
  // 获取 活动作品展示
  export function activeListShow(data) {
    return request({
      url: communityUrl + '/mobileapi/community/products',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

// 获取精选
  export function nicetopic(data) {
    return request({
      url: communityUrl + '/mobileapi/community/nicetopic',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

// 获取圈子详情
  export function quanzifollwo(data) {
    return request({
      url: communityUrl + '/mobileapi/community/quanzifollwo',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

// 获取所有活动列表（人）
  export function allActiveList(data) {
    return request({
      url: communityUrl + '/mobileapi/community/pactivity',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

// 获取圈子信息
  export function circleHome(data) {
    return request({
      url: communityUrl + '/mobileapi/community/memberindex',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

//社区右边获取圈子信息(全部)
  export function allquanzi(data) {
    return request({
      url: communityUrl + '/mobileapi/community/allquanzi',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

//社区右边获取圈子信息(我参加的)
  export function usactivity(data) {
    return request({
      url: communityUrl + '/mobileapi/community/usactivity',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

//社区右边获取推荐 用户 等信息
  export function useraddindex(data) {
    return request({
      url: communityUrl + '/mobileapi/community/useraddindex',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  };

  // 获取 好友主页 关键字搜索
  export function useradinfor(data) {
    return request({
      url: communityUrl + '/mobileapi/community/useradinfor',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  };
    // 获取我的粉丝
  export function getMyfans(data) {
    return request({
      url: communityUrl + '/mobileapi/community/myfans',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  };



//社区右边获取我的圈子信息
  export function ourquanzi(data) {
    return request({
      url: communityUrl + '/mobileapi/community/ourquanzi',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

//点击获取他人的主页
  export function userInfoData(data) {
    return request({
      url: communityUrl + '/mobileapi/community/memberindex',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }




//点赞评论
export function likecomment(data) {
  return request({
    url: communityUrl + '/mobileapi/community/set_pldlc',
    method: Method.GET,
    headers: {
      "ADMINtoken": localStorage.getItem("accessToken"),
    },
    needToken: true,
    params: data
  })
}


  export function seedetail(data) {
    return request({
      url: communityUrl + '/mobileapi/community/seeDetail',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

//发布评论
  export function replaycomits(data) {
    return request({
      url: communityUrl + '/mobileapi/community/replay_comits',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

//关注贴主
  export function followUser(data) {
    return request({
      url: communityUrl + '/mobileapi/community/gzmember',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

//一键三连
export function setdlc(data) {
  return request({
    url: communityUrl + '/mobileapi/community/set_dlc',
    method: Method.GET,
    headers: {
      "ADMINtoken": localStorage.getItem("accessToken"),
    },
    needToken: true,
    params: data
  })
}

//删除帖子
export function delTopic(data) {
  return request({
    url: communityUrl + '/mobileapi/community/deltopic',
    method: Method.GET,
    headers: {
      "ADMINtoken": localStorage.getItem("accessToken"),
    },
    needToken: true,
    params: data
  })
}
// 根据Id获取圈子详情
export function getCircle(data) {
  return request({
    url: communityUrl + '/mobileapi/community/detailquanzi',
    method: Method.GET,
    headers: {
      "ADMINtoken": localStorage.getItem("accessToken"),
    },
    needToken: true,
    params: data
  })
}
// 报名参加活动
export function joinActive(data) {
  return request({
    url: communityUrl + '/mobileapi/community/pushtopic',
    method: Method.GET,
    headers: {
      "ADMINtoken": localStorage.getItem("accessToken"),
    },
    needToken: true,
    params: data
  })
}
// 获取参与活动人员列表
export function getpeopleList(data) {
  return request({
    url: communityUrl + '/mobileapi/community/avmember',
    method: Method.GET,
    headers: {
      "ADMINtoken": localStorage.getItem("accessToken"),
    },
    needToken: true,
    params: data
  })
}



// 点击关注
  export function clickFollowFriend(data) {
    return request({
      url: communityUrl + '/mobileapi/community/gzcir',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

// 社区我的话题点击关注
  export function myallin(data) {
    return request({
      url: communityUrl + '/mobileapi/community/myallin',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

// 社区我的话题点击删除
  export function ptdelet(data) {
    return request({
      url: communityUrl + '/mobileapi/community/ptdelet',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }


//获取社区圈子
  export function getChosList(data) {
    return request({
      url: communityUrl + '/mobileapi/community/pushtcircle',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

//验证圈子是否可选
  export function getChosStatus(data) {
    return request({
      url: communityUrl + '/mobileapi/community/choscircle',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }

//社区发帖
  export function setChosInfo(params) {
    return request({
      url: communityUrl + '/mobileapi/community/pushtopic',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: params
    })
  }

//社区编辑帖子
  export function editChosInfo(params) {
    return request({
      url: communityUrl + '/mobileapi/community/edittopic',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: params
    })
  }

//社区-删除草稿箱
  export function delDraftId(params) {
    return request({
      url: communityUrl + '/mobileapi/community/deltopic',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: params
    })
  }

//社区草稿箱
  export function getActiveList(data) {
    return request({
      url: communityUrl + '/mobileapi/community/caogao',
      method: Method.GET,
      headers: {
        "ADMINtoken": localStorage.getItem("accessToken"),
      },
      needToken: true,
      params: data
    })
  }
//个人收藏话题
export function getTopTopicList(data) {
  return request({
    url: communityUrl + '/mobileapi/community/picktopick',
    method: Method.GET,
    headers: {
      "ADMINtoken": localStorage.getItem("accessToken"),
    },
    needToken: true,
    params: data
  })
}
//删除收藏
export function delTopicList(data) {
  return request({
    url: communityUrl + '/mobileapi/community/ptdelet',
    method: Method.GET,
    headers: {
      "ADMINtoken": localStorage.getItem("accessToken"),
    },
    needToken: true,
    params: data
  })
}